package com.itgungnir.designpattern.builder;

import java.util.ArrayList;
import java.util.List;

import com.itgungnir.designpattern.builder.parts.Part;

public class Product {
	private List<Part> parts;

	public Product() {
		this.parts = new ArrayList<>();
	}

	public void addComponent(Part part) {
		parts.add(part);
	}

	public void display() {
		for (Part p : parts) {
			p.onPartPrepared();
		}
		System.out.println();
	}
}